package com.demo.springcloud.feign;

import com.demo.springcloud.entity.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author hxg
 * @version 1.0
 * @date 2022/1/14 22:32
 */
//当消费侧的服务宕机后 会调用fallback进行服务降级
@FeignClient(value = "cloudalibaba-nacos-payment",fallback = paymentFallService.class)
public interface paymentService {
    @GetMapping("/payment/{id}")
    public R paymentTest(@PathVariable("id")Long id);

}
